<?php
// 应用公共文件
/**
 * 更新会员信息（不包含资金字段）
 */

function update_user_info($userId){
    $loginToken = cache("app:login:$userId");
    if(empty($loginToken)){
        return true;
    }
    $member = db('member')->where(['member_id'=>$userId])->find();
    unset($member['member_points'],$member['available_predeposit'],$member['freeze_predeposit'],$member['available_rc_balance'],$member['freeze_rc_balance'],$member['member_exppoints']);
    cache('app:login:' . $loginToken, json_encode($member), 777600); //90天
}